<template>
  <div class="news-list">
    <div class="item">
      <div class="con">
        <h4 class="title">全职妈妈的悲哀</h4>
        <p class="hint">
          我就在家当了一年的全职妈妈，家里就已经入不敷出了，给老公要钱永远都是往后推，等我开工资着，等我两天。可惜这...
        </p>
      </div>
      <div class="pic">
        <img
          src="https://upload-images.jianshu.io/upload_images/10327437-9e55665601dcc88f.jpg"
          alt=""
        />
      </div>
    </div>
    <div class="loading">加载更多数据...</div>
  </div>
</template>

<script>
export default {
  name: 'news-list'
}
</script>

<style lang="less" scoped>
.news-list {
  .item {
    position: relative;
    padding: 10px 0;
    min-height: 120px;
    border-bottom: 1px dashed #eee;

    .con {
      margin-right: 170px;

      .title {
        line-height: 30px;
        font-size: 16px;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
      }

      .hint {
        font-size: 14px;
        line-height: 20px;
      }
    }

    .pic {
      position: absolute;
      top: 10px;
      right: 10px;
      box-sizing: border-box;
      width: 150px;
      height: 120px;
      overflow: hidden;
      background: url('../assets/defaultbg.webp') no-repeat;
      background-size: 100% 100%;

      img {
        display: block;
        width: 100%;
        height: 100%;
      }
    }
  }

  .loading {
    height: 50px;
    line-height: 50px;
    text-align: center;
  }
}
</style>
